<h2 translate="FORUM.CREATE_THREAD"></h2>

<div class="col-md-8 col-md-push-2">
	<form role="form" ng-submit="vm.createTopic()">
		<div class="panel" style="padding: 10px;">
			<div class="form-group" style="text-align: left;">
				<label for="subject" translate="FORUM.TOPIC"></label>
				<input type="text" id="subject" class="form-control" placeholder="{{ 'FORUM.TOPIC' | translate }}" ng-model="vm.post.subject" required />
			</div>
			<div class="form-group" style="text-align: left;">
				<label for="sub" translate="FORUM.SUB_HEADER"></label>
				<input type="text" id="sub" class="form-control" placeholder="{{ 'FORUM.SUB_HEADER_PLACEHOLDER' | translate }}" ng-model="vm.post.sub" />
			</div>
			<div class="form-group" style="text-align: left;">
				<label for="vm.postText" translate="FORUM.POST"></label>
				<textarea class="form-control" rows="8" id="vm.postText" ng-model="vm.post.body" placeholder="{{ 'FORUM.WRITE_POST' | translate }}" required></textarea>
			</div>
		</div>

		<div class="text-center" style="clear: both;">
			<input type="submit" class="btn btn-primary" ng-show="vm.postStatus == 0" value="{{ 'FORUM.SUBMIT' | translate }}" />
			<button ng-show="vm.postStatus == 1" class="btn btn-primary disabled"><i class="fa fa-spinner fa-spin"></i></button>
			<!--
			<br />
			<br />
			<button class="btn btn-default btn-xs" ng-click="vm.showSmilies()">Smilies</button>
			<button class="btn btn-default btn-xs" ng-click="vm.howBBTags()">BB-taggar</button>
			-->
			<br />
			<br />
			<uib-alert type="{{ vm.alert.type }}" close="vm.closeAlert()" ng-show="vm.alert != null">
				{{ vm.alert.msg }}
			</uib-alert>
		</div>
	</form>
</div>
<div class="col-md-10 col-centered">
	<h3 class="text-center" translate="FORUM.POST_LIVE_PREVIEW"></h3>
	<posts posts="[vm.post]"></posts>
</div>
